﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="WorkFlow_WFDesigner_UserControl_MunualNode" Codebehind="MunualNode.ascx.cs" %>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class='tEdit'>
<tr style="display:none;">
    <td style="width:100px"></td><td></td><td style="width:100px"></td><td></td>
</tr>
<tr>
    <td>业务驱动：</td>
    <td colspan="3"><asp:TextBox ID="txtExecFunction" runat="server" CssClass="input2" Width="98%" Rows="2" TextMode="MultiLine" ToolTip="从任务栏进入的业务页面Url！"></asp:TextBox>
            </td>
</tr>
<tr>
    <td colspan="2">
    <asp:CheckBox ID="chkIsDraftOut" runat="server" Text="起草环节"></asp:CheckBox></td>
    <td colspan="2"><asp:CheckBox ID="chkIsAutoNode" runat="server" Text="自动完成"></asp:CheckBox>(处理者必须唯一)
    </td>
</tr>        
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsPress" runat="server" Text="启用任务催办" onclick="mIsPress();" /></td>
    <td>处理时间(天)：</td><td><asp:TextBox ID="txtPressWaiting" runat="server" Width="80px"  CssClass="input2" style="text-align:right" onfocus="this.style.textAlign='left'" onblur="this.style.textAlign='right'" onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\\D/)" ondragenter="return false"></asp:TextBox><asp:CheckBox ID="chkIsPressWorkDay" runat="server" Text="工作日"></asp:CheckBox></td>
</tr>
<tr>
    <td>最多催办次数：</td><td><asp:TextBox ID="txtPressTime" CssClass="input2" runat="server" Width="80px" style="text-align:right" onfocus="this.style.textAlign='left'" onblur="this.style.textAlign='right'" onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\\D/)" ondragenter="return false"></asp:TextBox></td>
    <td>催办时间间隔：</td><td><asp:TextBox ID="txtPressSpace"  CssClass="input2" runat="server" Width="80px" style="text-align:right" onfocus="this.style.textAlign='left'" onblur="this.style.textAlign='right'" onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\\D/)" ondragenter="return false"></asp:TextBox>(小时)</td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsToBlacklist" runat="server" Text="超时进入黑名单"></asp:CheckBox></td>
    <td>预警时间：</td><td><asp:TextBox ID="txtAlarmTime" runat="server"  CssClass="input2" Width="80px" style="text-align:right" onfocus="this.style.textAlign='left'" onblur="this.style.textAlign='right'" onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\\D/)" ondragenter="return false"></asp:TextBox>(小时)</td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsSerial" runat="server" Text="按指派顺序处理"></asp:CheckBox></td>
    <td colspan="2"><asp:CheckBox ID="chkIsDisplayTransact" runat="server" Text="显示处理意见"></asp:CheckBox></td>
</tr>
<tr>
    <td colspan="2">
        最多允许<asp:TextBox ID="txtMaxSignatoryCount" runat="server" CssClass="input2" Text="0" Width="20px" style="text-align:right" onfocus="this.style.textAlign='left'" onblur="this.style.textAlign='right'" onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\\D/)" ondragenter="return false"></asp:TextBox>个人处理（0表示无人数限制）</td>
    <td colspan="2"><asp:CheckBox ID="chkIsAllowNullOpinion" runat="server" Text="允许空意见" /></td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsAcc" runat="server" Text="有后置业务操作"></asp:CheckBox></td>
    <td colspan="2"><asp:CheckBox ID="chkIsReadyDepend" runat="server" Text="活动就绪必须依赖其他流程"></asp:CheckBox></td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsEspecialSend" runat="server" Text="允许特送"></asp:CheckBox>&nbsp;&nbsp;&nbsp;<a href="#" onclick="SetSpecialNode();">指定环节</a><asp:HiddenField runat="server" ID="hidSpecialNode" /></td>
    <td colspan="2"><asp:CheckBox ID="chkIsTranscribe" runat="server" Text="允许抄送"></asp:CheckBox></td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsExterior" runat="server" Text="允许外部通信" onclick="mIsExterior();"></asp:CheckBox></td>
    <td>外部通信类型：</td><td><asp:DropDownList ID="ddlMessageMethod" runat="server" Width="98%"  CssClass="input2">
        </asp:DropDownList></td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsCheckSignatory" runat="server" Text="可更改签字人姓名"></asp:CheckBox></td>
    <td colspan="2">
        <asp:CheckBox ID="chkIsCheckSendMessage" runat="server" Text="默认自动选中发送消息" /></td>
</tr>
<tr>
    <td colspan="2"><asp:CheckBox ID="chkIsHiddenNextAct" runat="server" Text="不显示后续环节及处理者" ToolTip="仅但只有一个后续环节并且只有一个处理者时才生效！"></asp:CheckBox>
        </td>
   <td colspan="2"><asp:CheckBox ID="chkIsCanChangTranTime" runat="server" Text="可更改签字时间"></asp:CheckBox></td>
</tr>
<tr>
    <td>处理方法：</td> <td><asp:DropDownList ID="ddlTransMethod" runat="server" Width="98%"  CssClass="input2">
        </asp:DropDownList></td>
   <td colspan="2">
       <asp:CheckBox ID="chkIsDispTransResult" runat="server" Text="显示处理结果" onclick="mDispTransResult();" /><asp:DropDownList ID="ddlTransactType" runat="server" Width="98%" Visible="False" >
        </asp:DropDownList></td>
</tr>
<tr><td colspan="2"><asp:CheckBox ID="chkIsDispCompleteAtTrans" runat="server" Text="处理时同时显示已完成活动的意见"></asp:CheckBox></td>
<td>默认处理结果：</td><td>
    <asp:DropDownList ID="ddlDefaultResult" runat="server" Width="98%"  CssClass="input2">
    </asp:DropDownList></td></tr>
<tr >
    <td colspan="4" >
        <fieldset >
            <legend>退回方式</legend>
            <asp:RadioButtonList ID="rblBackMethod" runat="server" Width="98%" RepeatLayout="Flow">
            </asp:RadioButtonList></fieldset>
    </td>
</tr>
</table>
<asp:HiddenField runat="server" ID="hidFlowID" />
<script language="javascript" type="text/javascript">
function mIsPress()
{
    var isCheck=document.getElementById('<%=chkIsPress.ClientID %>').checked;
    document.getElementById('<%=txtPressWaiting.ClientID %>').disabled=!isCheck;
    document.getElementById('<%=chkIsPressWorkDay.ClientID %>').disabled=!isCheck;
    document.getElementById('<%=txtPressTime.ClientID %>').disabled=!isCheck;
    document.getElementById('<%=txtPressSpace.ClientID %>').disabled=!isCheck;
    document.getElementById('<%=chkIsToBlacklist.ClientID %>').disabled=!isCheck;
}
function mIsExterior()
{
    var isCheck=document.getElementById('<%=chkIsExterior.ClientID %>').checked;
    document.getElementById('<%=ddlMessageMethod.ClientID %>').disabled=!isCheck;
}
function mDispTransResult() {
    var isCheck = document.getElementById('<%=chkIsDispTransResult.ClientID %>').checked;
    document.getElementById('<%=ddlDefaultResult.ClientID %>').disabled = !isCheck;
}
function nodeData() {
    var ID;
    var Name;
}
function SetSpecialNode() {
    var nodeIdStr = document.getElementById("<%=hidSpecialNode.ClientID %>").value;
    var arrObj = null;
    if (nodeIdStr != "") {
        var arrNodeId = nodeIdStr.split(",");
        arrObj = new Array(arrNodeId.length);
        var item = null;
        if (arrNodeId != null) {
            for (var i = 0; i < arrNodeId.length; i++) {
                item = new nodeData();
                item.ID = arrNodeId[i].split('|')[0];
                item.Name = arrNodeId[i].split('|')[1];
                arrObj[i] = item;
            }
        }
    }
    var flowId = document.getElementById("<%=hidFlowID.ClientID %>").value;
    var retValue = window.showModalDialog('<%=Page.ResolveClientUrl("~/") %>Workflow/WFDesigner/SelectNode.aspx?FlowID=' + flowId + "&ranId=" + escape(new Date()), arrObj, "scroll:0;status:0;help:1;resizable:0;dialogWidth:800px;dialogHeight:600px");
    if (retValue != null && typeof (retValue) != 'undefined') {
        if (retValue.length == 0) {
            document.getElementById("<%=hidSpecialNode.ClientID %>").value = "";
        }
        else {
            nodeIdStr = '';
            for (var i = 0; i < retValue.length; i++) {
                if (nodeIdStr != '') {
                    nodeIdStr += ",";
                }
                nodeIdStr += retValue[i].ID + "|" + retValue[i].Name;
            }
            document.getElementById("<%=hidSpecialNode.ClientID %>").value = nodeIdStr;
        }
    }
}
</script>